package com.itheima.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 生成和校验jwt
 *
 * @Author itcast
 * @Create 2024/11/1
 **/
@RestController
@RequestMapping("/jwt")
public class JwtController {

    /**
     * 生成jwt令牌
     * @return
     */
    @GetMapping("/generateJwt")
    public String generateJwt(){
        return null;
    }

    /**
     * 校验jwt令牌
     * @return
     */
    @GetMapping("/validateJwt")
    public String validateJwt(HttpServletRequest request){
        //从request的请求头中获取前端提交的jwt令牌
        return null;
    }

}
